<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<script src="./js/vue.js" type="text/javascript" charset="utf-8"></script>
	</head>
	<body>
		<div id="box">
			<child :msg="msg"></child>
		</div>
		<script type="text/javascript">
			Vue.component("child",{
				template:`<div>{{childMsg}}父组件传递过来的值:{{msg}}
				
				</div>`,
					data(){
						return{
							childMsg:"child"
						}
					},
					props:{
						msg:{
							type:String,
							default:"默认值"
						}
					}
			})
			const vm=new Vue({
				el:"#box",
				data:{
					msg:"根状态"
				}
			})
		</script>
	</body>
</html>
